<template>
<view class="loading" v-if="visbole">
	<image class="image" :src="icon"></image>
</view>

</template>

<script>
export default {
	data() {
		return {
			visbole: false,
			icon: '',
			// text: '',
			// content: '',
		};
	},
	methods: {
		show: function(param = {}) {
			this.visbole = true;
			// this.text = param.text ?? '';
			// this.content = param.content ?? '';
			this.icon = param.icon ?? require('./loading.gif');
		},
		hide: function(param = {}) {
			this.visbole = false;
		},
	}
};
</script>

<style lang="scss" scoped>
.loading{
  background: #fff;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading .image{
  width: 130rpx;
  height: 90rpx;
}
</style>
